package com.cn.xcsharp.dataconfig;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

@Configuration
public class WebMvcConfig {

    @Bean
    @ConfigurationProperties(prefix = "spring.datasource.orcle")
    DataSource orcle(){
        return DruidDataSourceBuilder.create().build();
    }
    @Bean
    @ConfigurationProperties(prefix = "spring.datasource.mysql")
    DataSource mysql(){
        return DruidDataSourceBuilder.create().build();
    }

}
